<template>
<div style="background: #efebee">
  <user >
    <template #body>
      <van-field v-show="!sclass.name" :value="sclass.name" readonly @click="show = true" placeholder="请选择认证类型">
        <van-icon slot="label" name="apps-o" />
        <van-icon slot="right-icon" name="arrow-down" />
      </van-field>
      <renzhengform @rest="rest" v-show="sclass.name" :obj="sclass" />
    </template>
  </user>
  <van-action-sheet
      cancel-text="取消"
      :duration="0.2"
      close-on-click-action
      v-model="show"
      :actions="actions"
      @select="onSelect" />
</div>
</template>

<script>
import user from "../../components/user";
import renzhengform from "./components/renzhengform";
export default {
  name: "renzheng",
  components:{user,renzhengform},
  data() {
    return {
      sclass:{
        name:null
      },
      show:false,
      actions: [
        { name: '品牌人员',type:1 },
        { name: '区域广告代理服务商',type:2 },
        { name: '网点人员',type:3 }]
    }
  },
  methods: {
    onSelect(e){
      console.log(e)
      this.sclass = e
    },
    rest(){
      this.sclass = {
        name:null
      }
    }
  }
}
</script>

<style scoped>

>>>.van-cell{
  margin: 8px 30px;
  width: auto;
  border-radius: 10px;
}
>>>.van-field__label{
  width: 24px;
  font-size: 24px;
}

</style>
